1. Field of the Invention
The present invention relates to a transform coding apparatus for performing band compression of image data using a linear transform coding system.
2. Description of the Prior Art
FIG. 1 is a block diagram illustrating a transform coding apparatus in the prior art disclosed, for example, in W. H. CHEN, W. K. PRATT, "Scene Adaptive Coder", (IEEE Transactions on communications, vol. COM-32, No. 3, March 1984). In FIG. 1, numeral 1 designates a blocking section for blocking input signals, numeral 2 designates a linear transform section for performing two-dimensional linear transform of the block signals, numeral 3 designates a scan transform section for rearranging signal series within the block, numeral 4 designates a quantization section, numeral 5 designates a coding section, numeral 6 designates a transmission buffer, and numeral 7 designates a coding control section.
Next, operation will be described. The blocking section 1 receives digitized input image signals 101 frame by frame, and divides the signals into two-dimensional blocks which have n pixels in the horizontal and vertical directions (n is a natural number, for example, n=4, 8, 16). The linear transform section 2 applies a two-dimensional linear transform (for example, orthogonal transform such as discrete cosine transform) to the blocked image signals 102, and produces transform coefficient blocks 103 in the space frequency region. In this case, the two-dimensional discrete cosine transform, for example, of 8.times.8 pixel blocks f (x, y) (x, y=0, 1, . . . , 7) can be given by following formula. ##EQU1## for u, v=0, 1, . . . , 7, where ##EQU2## where x, y are coordinates in the pixel region and u, v are coordinates in the transform region.
Properties of the transform coefficient blocks F(u, v) will be described based on FIG. 2. Values of F(u, v) indicate the degree of the respective space frequency components included in the blocked image signals 102. The frequency in the horizontal direction becomes high as the value of u becomes large, and the frequency in the vertical direction becomes high as the value of v becomes large. That is, the value of F(0, 0) corresponds to the intensity of the DC component of the blocked image signal 102, and the value of F(7, 7) corresponds to the intensity of the AC component having high frequencies in both the horizontal and vertical directions. Consequently, for a stationary image block such as the background where variation of values of pixels is little, significant coefficients of non-zero appear only at lower frequency components and zero coefficients appear at most of higher frequency components. On the contrary, for an image block of the edge portion or the like where variation of values of pixels is high, significant coefficients of non-zero appear not only at lower frequency components but also at higher frequency components.
Next, the scan transform section 3 rearranges the transfer coefficients within the transfer coefficient block 103, for example, in the order of arrow shown in FIG. 2, and outputs transform coefficient series 104. In the foregoing 8.times.8 pixel block, the coefficient series of consecutive 64 coefficients is outputted for one block. The rearrangement is performed by zigzag scanning from transform coefficients of lower frequency components where significant coefficients are likely to occur to transform coefficients of higher frequency components where significant coefficients are less likely to occur, so that the significant coefficients continue at front half and the zero coefficients continue at rear half as much as possible. Next, the quantization section 4 quantizes the transform coefficient series 104 in given quantization step size 109, and outputs quantized level series Q(u, v) 105. The coding section 5 allocates codes to the quantized level series 105, and outputs coded data 106 to the transmission buffer 6.
The two-dimensional variable length coding will now be described as an example of a code allocating method. This is performed such that the number of consecutive zero quantized levels (hereinafter referred to as "run") and the non-zero quantized levels are combined for the quantized level series 105, and one Huffman code is allocated for the combined event (run level). For example, in the case of the quantized level series shown in FIG. 3, the event (run level) becomes as follows.
(0, 20), (2, 15), (4, 5), (3, 2), (7, 1), EOB; where EOB is a mark indicating that non-zero quantized level does not exist and a zero quantized level continues until the end of the block. Consequently, in the case of the quantized level series, the predetermined Huffman codes are allocated respectively to the six events including the EOB.
Next, the transmission buffer 6 smoothes the varying the amount of the coded bits and transmits the code 107 at constant rate to the transmission line. The coding control section 7 performs feedback control of quantization step size 109 adaptively, with buffer occupancy signal 108 being the quantity of residual data in the transmission buffer 6, and outputs it to the quantization section 4. That is, when the buffer occupancy signal 108 is large, in order to decrease the amount of the coded bits, the quantization step size 109 is made large and the input image is quantized coarsely. On the contrary, when the buffer occupancy 108 is small, in order to increase the amount of the coded bits, the quantization step size 109 is made small and the input image is quantized finely. Since the number of non-zero quantized levels is significantly different depending on whether the quantization step size 109 is large or small, the amount of the coded bits varies significantly from several tens to several thousands of bits.
FIG. 4 is a block diagram showing another transform coding apparatus in the prior art. In FIG. 4, numeral 10 designates a decision section allowing only the transform coefficients within the prescribed transmission range to pass, numeral 11 designates a comparison section for comparing the transform coefficients with the threshold value, numeral 12 designates a transmission range determining section for determining the transmission range of the transform coefficients, numeral 13 designates a threshold setting section for setting the threshold value, and numeral 14 designates a control section for determining the quantization characteristics and the threshold value.
Next, operation will be described. The blocking section 1 receives digitized input image signals 101 frame by frame, and divides the signals into two-dimensional blocks which have n pixels in the horizontal and vertical directions (n is a natural number, for example, n=4, 8, 16). The linear transform section 2 applies a two-dimensional linear transform (for example, an orthogonal transform such as discrete cosine transform) to the blocked image signals 102, and produces transform coefficient blocks 103 in the space frequency region.
Next, the comparison section 11 compares the transform coefficient block 103 with the threshold value 113 given from the threshold setting section 13, and outputs the decision results 112. The transmission range determining section 12 totalizes the decision results 112 which are complete for each block and determines which coefficients will be transmitted and outputs the transmission range 114. That is, the transmission range determining section 12 totalizes the decision results 112 which is complete in 64 pieces obtained for the 64 coefficients in the 8.times.8 blocks. As a result, if the decision results indicate that many transform coefficients of block 103 are less than the threshold value 111, only lower frequency components may be transmitted and therefore the transmission range 114 is small. On the contrary, if the decision results indicate that many transform coefficients of block 103 are more than the threshold value 111, not only lower frequency components but also higher frequency components must be transmitted and therefore the transmission range 114 becomes large. The scan transform section 3 rearranges the transform coefficients within the transform coefficient block 103, for example, in the order to arrow shown in FIG. 2, and outputs a transform coefficient series 104. The rearrangement is performed by zigzag scanning from transform coefficients of lower frequency components where significant coefficients are likely to occur to transform coefficients of higher frequency components where significant coefficients are less likely to occur, so that the significant coefficient series continues as long as possible. Next the decision section 10 outputs only the transform coefficients 110 of the transform coefficient series 104 within the given transmission range 114. The quantization section 4 quantizes the transform coefficients 110 in the given quantization characteristics 115, and outputs quantized levels 105. The coding section 5 allocates codes based on the quantization characteristics 115 used in the quantization section 4, the quantized levels 105 and the transmission range 114, and transmits the codes 106 to the transmission line or the like. Also the control section 14 controls the quantization characteristics 115 and the threshold value 113 adaptively by the amount of the coded bits of the input image. That is, when the input image is quantized coarsely and the amount of the coded bits is decreased, both the quantization characteristics 115 and the threshold value 113 are outputted in large values. On the contrary, when the input image is quantized finely and the amount of the coded bits is increased, both the quantization characteristics 115 and the threshold value 113 are outputted in small values.
The transform coding apparatus in the prior art shown in FIG. 1 has problems in that the quantization must be performed for any coefficient, and the amount of the coded bits varies significantly depending on whether the quantization step size is large or small and therefore the control of the coding is difficult.
Also the transform coding apparatus in the prior art shown in FIG. 4 has problems in that although the non-zero transform coefficients to be coded and transmitted are limited, all transform coefficients must be obtained in order to estimate the coefficient transmission range, and therefore the processing time required for the linear transform cannot be reduced.